package com.example.onlineeducation.data.model

import android.os.Parcelable
import androidx.recyclerview.widget.DiffUtil
import kotlinx.android.parcel.Parcelize

@Parcelize
data class ScoreRecordListDataModel(
    var createTime: String?,//考试记录的id
    var points: String?,//考试的id
    var remark: String,
    ) : Parcelable {
    companion object {
        val diffCallback = object : DiffUtil.ItemCallback<ScoreRecordListDataModel>() {
            override fun areItemsTheSame(
                oldItem: ScoreRecordListDataModel,
                newItem: ScoreRecordListDataModel
            ): Boolean {
                return oldItem == newItem
            }

            override fun areContentsTheSame(
                oldItem: ScoreRecordListDataModel,
                newItem: ScoreRecordListDataModel
            ): Boolean {
                return oldItem.createTime == newItem.createTime
                        && oldItem.points == newItem.points
                        && oldItem.remark == newItem.remark

            }
        }
    }
}